<template>
    <div>
        <el-menu
                style="width: 200px;min-height: calc(100vh - 50px);"
                class="el-menu-vertical-demo"
                router
                default-active="user">
            <!--使用user设置高亮-->

            <el-sub-menu index="1">
                <template #title>我的个人中心</template>
                <el-menu-item index="course" :route="{path:'/course'}">课程中心</el-menu-item>
                <el-menu-item index="homework" :route="{path:'/homework'}">我的作业</el-menu-item>
                <el-menu-item index="files" :route="{path:'/files'}">我的课表</el-menu-item>
                <el-menu-item index="class" :route="{path:'/class'}">班级管理</el-menu-item>
                <el-menu-item index="info" :route="{path:'/info'}">个人信息</el-menu-item>
            </el-sub-menu>
        </el-menu>
    </div>
</template>

<script>

export default {
    name: "Aside",
    data() {
        return {
            user: {},
        }
    },
    created() {
        let userStr = sessionStorage.getItem("user") || "{}"
        this.user = JSON.parse(userStr)
    }
}
</script>

<style scoped>

</style>
